package main

import (
	"fmt"
	"reflect"
)

type student struct {
	name string
	age  int
}

func main() {
	m := make(map[string]*student)
	stus := []student{
		{name: "小王子", age: 18},
		{name: "娜扎", age: 23},
		{name: "大王八", age: 9000},
	}

	// for i := 0; i < len(stus); i++ {
	// 	fmt.Printf("%v\n", &stus[i])
	// 	m[stus[i].name] = &stus[i]
	// }

	for _, stu := range stus {
		//fmt.Printf("%v\n", &stu.name)
		m[stu.name] = &stu
	}
	fmt.Printf("%v\n", m)
	for k, v := range m {
		fmt.Println(k, "=>", v.name)
	}

	aaa := 111.11
	bbb := int(aaa)
	fmt.Println(reflect.TypeOf(bbb))

	ccc := new(student)

	fmt.Print(&ccc)
}
